import {
    ref
} from 'vue';

import {
    defineStore
} from 'pinia'

const useLoadingStore = defineStore('loading',
    () => {
        // 定义响应式数据
        const loading = ref(false);

        // 定义方法
        const setLoading = (val) => {
            loading.value = val;
        }

        return {
            loading,
            setLoading
        };

    })

export {
    useLoadingStore
}